﻿@model PortalWeb.Models.Cms.CategoryViewModel
@{
    Layout = null;
    ViewBag.Title = "增加 栏目";
}

@*@section scripts{
    <script type="text/javascript" src="~/Scripts/kindeditor-4.1.10/kindeditor-min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.easyui.min.js"></script>
   
}*@

@using (Ajax.BeginForm("Create", "Category", new AjaxOptions
{
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "POST",
    OnSuccess = "OnSuccess"
}, new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 id="myModalLabel" class="modal-title">@ViewBag.Title</h4>
        </div>
        <div class="modal-body">
            @Html.ValidationSummary(true)
            <div class="form-group">

                @Html.LabelFor(model => model.ParentId, new {@class = "control-label col-sm-2"})
                <div class="col-sm-10">
                    <input id="CategoryId" name="CategoryId" data-options="url:'@Url.Action("JsonTree", "Category", new {model = "Article"})'" class="easyui-combotree" style="height: 34px; width: 280px;"/>
                    @Html.ValidationMessageFor(model => model.ParentId)
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.Name, new {@class = "control-label col-sm-2"})
                <div class="col-sm-10">
                    @Html.TextBoxFor(model => model.Name, new {@class = "form-control"})
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.Model, new {@class = "control-label col-sm-2"})
                <div class="col-sm-10">
                    @Html.TextBoxFor(model => model.Model, new {@class = "form-control"})
                    @Html.ValidationMessageFor(model => model.Model)
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="创建" class="btn btn-default"/>
                </div>
            </div>
        </div>
    </div>
}
